<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@page isELIgnored="false"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>

<c:if test="${sessionScope.Cliente == null}">
	<c:set var="mensagem" value="Por favor escolher um cliente!" scope="request"/>
	<jsp:forward page="mensagens.jsp"/>
</c:if>

<c:set var="cliente" value="${sessionScope.Cliente}"/>
<c:set var="planilha" value="${sessionScope.Planilha}"/>

<h2>Selecionar Despesa - ${cliente.nome} - ${planilha.nome_planilha}</h2>

<hr/>

<a href="controleDespAnt?opcao=NOVA_DESPESA"><span class="caracter">.: </span>Nova Despesa<span class="caracter"> :.</span></a>
<a href="controleDespAnt?opcao=VER_DIVIDAS_QUITADAS"><span class="caracter">.: </span>Despesas Apropriadas<span class="caracter"> :.</span></a>

<hr/>

<c:if test="${requestScope.Despesas != null}">

	<form action="controleDespAnt" id="formulario">
	
		<table align="center">
		
			<tbody>
				
				<tr>
					<td class="label"><label>Despesa:</label></td>
					<td>

					<select name="despesas">
						<c:forEach var="despesa" items="${requestScope.Despesas}">
							<option value="${despesa.id}">${despesa.nome_despesa} - ${despesa.total_despesa} - ${despesa.data_string}</option>
						</c:forEach>
					</select>

					</td>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td>&nbsp;</td>
				</tr>
				<tr>
					<td colspan="2"><input class="button" type="submit" id="enviar" name="enviar" value="Selecionar"/>
					<input type="hidden" name="opcao" value="SELECIONA_DIVIDA"/>
					</td>
				</tr>					
					
			</tbody>
		
		</table>
			
	</form>

</c:if>	

</body>
</html>